Skip to content

feat: backport batch chonk verifier with split peer/RPC architecture to v4#21638

Open
ludamad wants to merge 1 commit intov4from
lw/batch-verifier-v4
Open

feat: backport batch chonk verifier with split peer/RPC architecture to v4#21638
ludamad wants to merge 1 commit intov4from
lw/batch-verifier-v4

Conversation

@ludamad
Copy link
Collaborator

@ludamad ludamad commented Mar 16, 2026

Summary

Backports the batch chonk verifier from #21460 to v4, with the split peer/RPC verifier architecture.

Architecture

Two verifier instances per node:

  • peerChonkVerifier (BatchChonkVerifier, batch_size=8) — for P2P gossip and reqresp tx validation
  • rpcChonkVerifier (QueuedIVCVerifier wrapping BatchChonkVerifier batch_size=1) — for RPC sendTx validation with concurrency control

C++ (barretenberg)

  • IPA::batch_reduce_verify — batch-verifies multiple IPA proofs with a single SRS MSM using random alpha-batching
  • IPA::read_transcript_data — refactored out of reduce_verify_internal_native for reuse by batch verification
  • ChonkVerifier::reduce_to_ipa_claim — runs all non-IPA verification (MegaZK, databus, Goblin), returns IPA claim
  • ChonkBatchVerifier — coordinator with parallel reduce (work-stealing), batch IPA check, and bisection for failure isolation
  • ChonkBatchVerifierService — wraps ChonkBatchVerifier with FIFO result streaming via named pipe
  • New bbapi RPC commands: ChonkBatchVerifierStart, ChonkBatchVerifierQueue, ChonkBatchVerifierStop

TypeScript (yarn-project)

  • BatchChonkVerifier — persistent bb native process, sends proofs via msgpack RPC, receives results via named FIFO
  • Split proofVerifier into peerChonkVerifier and rpcChonkVerifier in AztecNodeService
  • Made P2P proofVerifier optional — skip proof validation when running in fake mode
  • QueuedIVCVerifier simplified constructor: (verifier, concurrency) instead of (config, verifier)
  • New config: BB_RPC_VERIFY_BATCH_SIZE, BB_PEER_VERIFY_BATCH_SIZE (default from BB_NUM_IVC_VERIFIERS for backwards compat)

Test plan

  • C++ batch verifier tests: chonk_batch_verifier.test.cpp (batch of 2, flush on shutdown, tampered proof bisection, invalid VK index)
  • bb binary builds successfully with all new commands
  • TypeScript builds cleanly (no new type errors)
  • Lint and format pass

…to v4

Adds batch IPA verification for Chonk proofs with a split verifier architecture:
- peerChonkVerifier (BatchChonkVerifier, batch=8) for P2P gossip/reqresp
- rpcChonkVerifier (QueuedIVCVerifier wrapping BatchChonkVerifier batch=1) for RPC

C++ changes:
- Add IPA::batch_reduce_verify for single-MSM batch IPA verification
- Refactor IPA::reduce_verify_internal_native to use read_transcript_data
- Add ChonkVerifier::reduce_to_ipa_claim for non-IPA verification extraction
- Add ChonkBatchVerifier with parallel reduce + batch IPA + bisection
- Add ChonkBatchVerifierService with FIFO result streaming
- Add batch verifier RPC commands (Start/Queue/Stop) to bbapi

TypeScript changes:
- Add BatchChonkVerifier class using bb batch verifier service via FIFO
- Split single proofVerifier into peerChonkVerifier and rpcChonkVerifier
- Make P2P proofVerifier optional (skip proof validation in fake mode)
- Add BB_RPC_VERIFY_BATCH_SIZE and BB_PEER_VERIFY_BATCH_SIZE config
- Simplify QueuedIVCVerifier constructor to (verifier, concurrency)
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​aztec/​noir-noir_js@​1.0.0-beta.18 ⏵ 1.0.0-beta.19100100100100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant